package by.yakusekmaxim.bookgid.webapp.page.utils.renderer;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import by.yakusekmaxim.bookgid.datamodel.Genre;

public class GenreRenderer implements IChoiceRenderer<Genre> {

	public static GenreRenderer INSTANCE = new GenreRenderer();

	@Override
	public Object getDisplayValue(Genre object) {

		return object.getName();
	}

	@Override
	public String getIdValue(Genre object, int index) {
		return object.getId().toString();
	}

}
